]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Make MenuManager to take an actor as parameter
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 9 Apr 2019 23:23:59 +0000 (18:23 -0500)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 17 Apr 2019 21:32:18 +0000 (21:32 +0000)
Since we assume now that most of the classes are actors per se we can just pass
the actor itself as parameter

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/487

js/gdm/loginDialog.js
js/ui/appDisplay.js
js/ui/backgroundMenu.js
js/ui/popupMenu.js
js/ui/shellEntry.js
js/ui/windowMenu.js

index 6c4d1357d0cf52f1bc11117780e7999973b7793e..b6f499014be985646fd0d80fd4bcf3f3064c4fa6 100644 (file)
@@ -325,7 +325,7 @@ var SessionMenuButton = class {
                  this._button.remove_style_pseudo_class('active');
         });
 
-        this._manager = new PopupMenu.PopupMenuManager({ actor: this._button },
+        this._manager = new PopupMenu.PopupMenuManager(this._button,
                                                        { actionMode: Shell.ActionMode.NONE });
         this._manager.addMenu(this._menu);
 
index 8b7dec7dc4b86b68711e4d4ebdd59dfc13ec4a65..1dd182b176aff86e8c375d715600b993ffd169d1 100644 (file)
@@ -1479,7 +1479,7 @@ var AppIcon = class AppIcon {
         this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this));
 
         this._menu = null;
-        this._menuManager = new PopupMenu.PopupMenuManager(this);
+        this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
 
         if (isDraggable) {
             this._draggable = DND.makeDraggable(this.actor);
index 7d3941bc73adbd0e28f79c38e433b8f53c0233d1..b5bb2a664fafa3bdf3c350045cfd888dfdd7a50f 100644 (file)
@@ -25,7 +25,7 @@ var BackgroundMenu = class BackgroundMenu extends PopupMenu.PopupMenu {
 function addBackgroundMenu(actor, layoutManager) {
     actor.reactive = true;
     actor._backgroundMenu = new BackgroundMenu(layoutManager);
-    actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor });
+    actor._backgroundManager = new PopupMenu.PopupMenuManager(actor);
     actor._backgroundManager.addMenu(actor._backgroundMenu);
 
     function openMenu(x, y) {
index 81d5a86b50d13aa9b160d5085a3ebb6fb3bb90e7..d61d18792ff4ecd183ca9b0cfe82154958eb16f2 100644 (file)
@@ -1180,7 +1180,7 @@ var PopupMenuManager = class {
         grabParams = Params.parse(grabParams,
                                   { actionMode: Shell.ActionMode.POPUP });
         this._owner = owner;
-        this._grabHelper = new GrabHelper.GrabHelper(owner.actor, grabParams);
+        this._grabHelper = new GrabHelper.GrabHelper(owner, grabParams);
         this._menus = [];
     }
 
index 79f1aad3e7ecd8d73f023d865512681a6f14a3c5..62b42f71bdf7557978604ead0174d1e26695fb30 100644 (file)
@@ -148,7 +148,7 @@ function addContextMenu(entry, params) {
 
     entry.menu = new EntryMenu(entry);
     entry.menu.isPassword = params.isPassword;
-    entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry },
+    entry._menuManager = new PopupMenu.PopupMenuManager(entry,
                                                         { actionMode: params.actionMode });
     entry._menuManager.addMenu(entry.menu);
 
index 628f145ea9fcd2498520b12e8769baa6797356dd..18bda4057ab60a634a416ffbe90b1f6e2c112a6e 100644 (file)
@@ -173,7 +173,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
 
 var WindowMenuManager = class {
     constructor() {
-        this._manager = new PopupMenu.PopupMenuManager({ actor: Main.layoutManager.dummyCursor });
+        this._manager = new PopupMenu.PopupMenuManager(Main.layoutManager.dummyCursor);
 
         this._sourceActor = new St.Widget({ reactive: true, visible: false });
         this._sourceActor.connect('button-press-event', () => {